package com.yuexun.dhdoctor.module.Contract.model.impl;


import com.yuexun.dhdoctor.module.Contract.api.PeopeApi;
import com.yuexun.dhdoctor.module.Contract.bean.PeopleBean;
import com.yuexun.dhdoctor.module.Contract.model.IPeopleModel;
import com.yuexun.dhdoctor.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by work-jx on 2016/7/18.
 */
public class PeopleModel implements IPeopleModel {
    private PeopeApi api;

    //记录Log
//    private final Logger log = ProUtil.getLogger(LoginModel.class);

    public PeopeApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(PeopeApi.class);
        }
    }
    @Override
    public Observable<PeopleBean> getPeopleDatas(Map<String, String> praise) {
        api = ApiInstance();
        return api.getPeopleDatas(praise);
    }
}
